


-- 循环语句



-- while循环
num=0
while num<5 do
	print(num)
	num=num+1
	
end
print("=======================================")

-- do while 循环
num =0
repeat
	print(num)
	num=num+1;
until num>5 --满足条件跳出

print("=======================================")

-- for循环
for i=1,10 do
	print(i)
end
print("--------------------------------------")
for i=1,10,2 do
	print(i)
end
print("--------------------------------------")
for i=10,0,-1 do
	print(i)
end
